<?php

namespace app\index\controller;

use app\common\controller\Frontend;
use app\common\model\Category;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        return $this->view->fetch();
    }

    public function test()
    {
        $name = '/uploads/20210905/3d278e23607f5cbc747ed0615c083a89.xls';
        if (strpos($name, '/') === 0) {
            $name = substr($name, 1);
            if (file_exists($name)) {
                file_download($name);
            }
        }
    }

}
